package com.controller.exception.resolve;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;

/**
 * 继承AbstractHandlerExceptionResolver实现自定义异常处理
 * @author Administrator
 *
 */
public class MyExceptionResolve extends AbstractHandlerExceptionResolver{

	@Override
	protected ModelAndView doResolveException(
			HttpServletRequest paramHttpServletRequest,
			HttpServletResponse paramHttpServletResponse, 
			Object paramObject, 
			Exception paramException) {
		return new ModelAndView("error");
	}

}
